package com.red.star.macalline.es.api.view;


import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/es/api/")
public class ViewController {

	@Resource
	private ViewService viewService;

	/**
	 * 添加小程序点击日志
	 * @param body
	 * @return
	 */
	@RequestMapping("/addView")
	public String addView(@RequestBody String body){
		viewService.addView(body);
		return "success";
	}


	/**
	 * 添加小程序接口访问日志
	 * @param body
	 * @return
	 */
	@RequestMapping("/addAccess")
	public String addAccess(@RequestBody String body){
		viewService.addAccess(body);
		return "success";
	}
}
